class Seiso::ImportMaster
  # Author:: Willie Wheeler
  # Copyright:: Copyright (c) 2014-2016 Expedia, Inc.
  # License:: Apache 2.0
  class Mappers::LoadBalancerMapper

    def initialize(resolver)
      @resolver = resolver
    end

    def map(doc_lb, context)
      {
        'name' => doc_lb['name'],
        'type' => doc_lb['type'],
        'ipAddress' => doc_lb['ipAddress'],
        'apiUrl' => doc_lb['apiUrl'],
        'dataCenter' => @resolver.item_uri('dataCenters', doc_lb['dataCenter'])
      }
    end
  end
end
